package com.zhouyu.staticProxy;

/**
 * 代理对象，静态代理
 */
public class TeacherDaoProxy implements ITeacher {

	/**
	 * 目标对象，通过接口来聚合
	 */
	private ITeacher target;

	/**
	 * 构造器
	 *
	 * @param target
	 */
	public TeacherDaoProxy(ITeacher target) {
		this.target = target;
	}

	@Override
	public void teach() {
		System.out.println("开始代理，完成某些操作....");
		target.teach();
		System.out.println("提交");
	}
}
